package com.itcast.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController/*标注我们是一个应用接口类,会被springmvc解析*/
@RequestMapping("/user")/*给我们这个应用层功能统一前缀*/
public class UserController02 {
    @RequestMapping("/add")
    public String add(){
        System.out.println("User的添加用户");
        return "添加用户成功";
    }
    @RequestMapping("/update")
    public String update(){
        System.out.println("User的修改用户");
        return "修改用户成功";
    }
    @RequestMapping("/delete")
    public String delete(){
        System.out.println("User的删除用户");
        return "删除用户成功";
    }
    @RequestMapping("/query")
    public String query(){
        System.out.println("User的查询用户");
        return "查询用户成功";
    }
}
